//
//  UIButton+ExpandButton.h
//  bliss
//
//  Created by mac on 2023/8/3.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

#define  Font(f) [UIFont systemFontOfSize:(f)]

typedef void (^ButtonBlock)(UIButton *button);
typedef NS_ENUM(NSUInteger, XDButtonEdgeInsetsStyle) {
    XDButtonEdgeInsetsStyleTop, // image在上，label在下
    XDButtonEdgeInsetsStyleLeft, // image在左，label在右
    XDButtonEdgeInsetsStyleBottom, // image在下，label在上
    XDButtonEdgeInsetsStyleRight // image在右，label在左
};

@interface UIButton (ExpandButton)

@property(nonatomic,copy)ButtonBlock block;//添加点击事件

//添加block
-(void)addClickBlock:(ButtonBlock)block;


/**
 *  设置button的titleLabel和imageView的布局样式，及间距
 *
 *  @param style titleLabel和imageView的布局样式
 *  @param space titleLabel和imageView的间距
 */
- (void)layoutButtonWithEdgeInsetsStyle:(XDButtonEdgeInsetsStyle)style
                        imageTitleSpace:(CGFloat)space;

@end

NS_ASSUME_NONNULL_END
